package ${bao}.${entityPackage};

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 描述: ${table.comment}
 * author: ${author}
 * date: ${date}
 */
@Table(name = "${entity}")
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public class ${entity} implements Serializable {

<#-- 循环属性名称 -->
<#list table.fields as field>
<#if field.comment??>
    /**
     * ${field.comment}
     */
</#if>
<#if field.keyIdentityFlag>
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
</#if>
    <#if field.propertyType=="Date">
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private ${field.propertyType} ${field.propertyName};
    <#else>
    private ${field.propertyType} ${field.propertyName};

    </#if>
</#list>

    @JsonIgnore
    private int pageSize = 10;

    @JsonIgnore
    private int pageNum = 1;

    @JsonIgnore
    private String orderBy;

    @JsonIgnore
    private String descFlag;


<#-- 循环set/get方法 -->
}
